
const HM_TOKEN= 'hM_token'
//存储
export const setToken = (val) => localStorage.setItem(HM_TOKEN, val)
//获取
export const getToken = () => localStorage.getItem(HM_TOKEN)
//删除
export const removeToken = () => localStorage.removeItem(HM_TOKEN)



//已关注栏目 本地存储三个操作
const HM_FOLLOW_CATE= 'hM_FOLLOW_CATE'
//存储
export const setCate = (val) => localStorage.setItem(HM_FOLLOW_CATE,JSON.stringify(val))
//获取
export const getCate = () => JSON.parse(localStorage.getItem(HM_FOLLOW_CATE))||[]
//删除
export const removeCate = () => localStorage.removeItem(HM_FOLLOW_CATE)




//未关注栏目  本地存储三个操作
const HM_UNFOLLOW_CATE= 'hM_UNFOLLOW_CATE'
//存储
export const setunCate = (val) => localStorage.setItem(HM_UNFOLLOW_CATE,JSON.stringify(val))
//获取
export const getunCate = () => JSON.parse(localStorage.getItem(HM_UNFOLLOW_CATE))||[]
//删除
export const removeunCate = () => localStorage.removeItem(HM_UNFOLLOW_CATE)

//存储用户ID
const HM_USER_ID= 'hM_USER_ID'
//存储
export const setUserId = (val) => localStorage.setItem(HM_USER_ID, val)
//获取
export const getUserId = () => localStorage.getItem(HM_USER_ID)
//删除
export const removeUserId = () => localStorage.removeItem(HM_USER_ID)


//搜索历史-多个
const hM_SEARCH_KEYWORD= 'hM_SEARCH_KEYWORD'
//存储
export const setSearchKeyword = (val) => localStorage.setItem(hM_SEARCH_KEYWORD,JSON.stringify(val))
//获取
export const getSearchKeyword  = () => JSON.parse(localStorage.getItem(hM_SEARCH_KEYWORD))||[]
//删除
export const removeSearchKeyword = () => localStorage.removeItem(hM_SEARCH_KEYWORD)
